﻿#region License
/*
 *CopyRight (c) By Denuvead All Rights Reserved
 *CreateDate:
 *Info:
 */
#endregion

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DevComponents.DotNetBar;
using System.Windows.Forms;

namespace PriErp.Commands
{
    public static class MsgBoxEx
    {
        /// <summary>
        /// 显示提示信息
        /// </summary>
        /// <param name="text">文本</param>
        /// <param name="caption">标题</param>
        /// <param name="buttons">按钮</param>
        /// <param name="icon">图标</param>
        /// <returns>DialogResult</returns>
        public static DialogResult Show(string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon)
        {
            MessageBoxEx.UseSystemLocalizedString = true;
            return MessageBoxEx.Show(text, caption, buttons, icon);
        }

        /// <summary>
        /// 显示提示信息
        /// </summary>
        /// <param name="text">IWin32Window</param>
        /// <param name="text">文本</param>
        /// <param name="caption">标题</param>
        /// <param name="buttons">按钮</param>
        /// <param name="icon">图标</param>
        /// <returns>DialogResult</returns>
        public static DialogResult Show(IWin32Window owner,string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon)
        {
            MessageBoxEx.UseSystemLocalizedString = true;
            return MessageBoxEx.Show(owner,text, caption, buttons, icon);
        }

        /// <summary>
        /// 显示提示信息
        /// </summary>
        /// <param name="text">文本</param>
        /// <param name="caption">标题</param>
        /// <param name="icon">图标</param>
        /// <returns>DialogResult</returns>
        public static DialogResult Show(string text, string caption, MessageBoxIcon icon)
        {
            MessageBoxEx.UseSystemLocalizedString = true;
            return MessageBoxEx.Show(text, caption, MessageBoxButtons.OK, icon);
        }

        /// <summary>
        /// 显示提示信息
        /// </summary>
        /// <param name="text">IWin32Window</param>
        /// <param name="text">文本</param>
        /// <param name="caption">标题</param>
        /// <param name="icon">图标</param>
        /// <returns>DialogResult</returns>
        public static DialogResult Show(IWin32Window owner, string text, string caption, MessageBoxIcon icon)
        {
            MessageBoxEx.UseSystemLocalizedString = true;
            return MessageBoxEx.Show(owner,text, caption, MessageBoxButtons.OK, icon);
        }
    }
}
